//
//  MujiDubFilePathUtility.h
//  MujiDubCoreLibrary
//
//  Created by Matt Austin on 4/29/14.
//  Copyright (c) 2014 EnglishCentral, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, MujiDubFilePathDirectory)
{
   MujiDubFilePathDirectoryUserCaches,
   MujiDubFilePathDirectoryUserDocument,
   MujiDubFilePathDirectoryUserAudio,
   MujiDubFilePathDirectoryUserOgg,
   MujiDubFilePathDirectoryUserAudioMP3
};

@interface MujiDubFilePathUtility : NSObject

@property (nonatomic, readonly, copy) NSMutableDictionary *mutablePaths;

+ (id)sharedUtility;

- (NSString *)getPathOfDirectory:(MujiDubFilePathDirectory)directory;

- (BOOL)fileExistsAtPath:(NSString *)path;

- (BOOL)createFileWithPath:(NSString *)path
              withContents:(NSData *)contents
                attributes:(NSDictionary *)attributes
        overWriteAnyCached:(BOOL)overWriteAnyCached;

- (NSString *)createFileWithPathComponent:(NSString *)pathComponent
                              inDirectory:(MujiDubFilePathDirectory)directory
                              withContent:(NSData *)content
                               attributes:(NSDictionary *)attributes
                       overWriteAnyCached:(BOOL)overWriteAnyCached;

- (BOOL)removeFileWithPathComponent:(NSString *)pathComponent inDirectory:(MujiDubFilePathDirectory)directory error:(NSError **)outError;

- (BOOL)removeFileWithPath:(NSString *)path error:(NSError **)outError;

@end
